import { httpGet, httpPost, httpPut, httpDelete } from '@/utils/http'

/**
 * 获取资产配置列表
 */
export const assetsListApi = (params) => {
  return httpGet('/api/admin/asset_config', params)
}

/**
 * 添加资产配置
 * @param asset_config_url
 * @param asset_config_title
 * @param asset_config_content
 */
export const addAssetsApi = (params) => {
  return httpPost('/api/admin/asset_config', params)
}

/**
 * 删除资产配置
 * @param asset_config_id
 */
export const deleteAssetsApi = (params) => {
  return httpDelete('/api/admin/asset_config', params)
}

/**
 * 更新资产配置
 * @param asset_config_id
 * @param asset_config_url
 * @param asset_config_title
 * @param asset_config_content
 */
export const updateAssetsApi = (params) => {
  return httpPut('/api/admin/asset_config', params)
}

/**  创建公司介绍 */

/**
 * 获取公司介绍列表
 */
export const companyIntroListApi = (params) => {
  return httpGet('/api/admin/company_intro', params)
}

/**
 * 添加公司介绍
 * @param company_intro_url
 * @param company_intro_title
 * @param company_intro_content
 */
export const addCompanyIntroApi = (params) => {
  return httpPost('/api/admin/company_intro', params)
}

/**
 * 删除公司介绍
 * @param company_intro_id
 */
export const deleteCompanyIntroApi = (params) => {
  return httpDelete('/api/admin/company_intro', params)
}

/**
 * 更新公司介绍
 * @param company_intro_id
 * @param company_intro_url
 * @param company_intro_title
 * @param company_intro_content
 */
export const updateCompanyIntroApi = (params) => {
  return httpPut('/api/admin/company_intro', params)
}

/** 创建项目 */

/**
 * 获取项目地区列表
 */
export const projectAreaListApi = (params) => {
  return httpGet('/api/admin/project_area', params)
}
/**
 * 创建项目地区
 * @param project_area_name
 */
export const addProjectAreaApi = (params) => {
  return httpPost('/api/admin/project_area', params)
}

/**
 * 删除项目地区
 * @param project_area_id
 */
export const deleteProjectAreaApi = (params) => {
  return httpDelete('/api/admin/project_area', params)
}
/**
 * 更新项目地区
 * @param project_area_id
 * @param project_area_name
 */
export const updateProjectAreaApi = (params) => {
  return httpPut('/api/admin/project_area', params)
}

/**
 * 获取项目列表
 * /api/user/project
 */
export const projectListApi = (params) => {
  return httpGet('/api/user/project', params)
}

/**
 * 添加项目
 */
export const addProjectApi = (params) => {
  return httpPost('/api/user/project', params)
}

/**
 * 删除项目
 */
export const deleteProjectApi = (params) => {
  return httpDelete('/api/user/project', params)
}

/**
 * 更新项目详情
 */
export const updateProjectApi = (params) => {
  return httpPut('/api/user/project', params)
}

/** 项目资讯 */

/**
 * 获取项目资讯列表
 */
export const projectNewsListApi = (params) => {
  return httpGet('/api/admin/project_news', params)
}

/**
 * 添加项目资讯
 * @param project_news_url
 * @param project_news_title
 * @param project_news_intro
 * @param project_news_content
 */
export const addProjectNewsApi = (params) => {
  return httpPost('/api/admin/project_news', params)
}

/**
 * 删除项目资讯
 * @param project_news_id
 */
export const deleteProjectNewsApi = (params) => {
  return httpDelete('/api/admin/project_news', params)
}

/**
 * 更新项目资讯
 * @param project_news_id
 * @param project_news_url
 * @param project_news_title
 * @param project_news_intro
 * @param project_news_content
 */
export const updateProjectNewsApi = (params) => {
  return httpPut('/api/admin/project_news', params)
}
